﻿// LightNet - Lightweight .NET Framework
// Copyright (c) 2010 http://lightnet.codeplex.com

namespace System.Runtime.CompilerServices
{
    /// <summary>
    /// Specifies whether to wrap exceptions that do not derive from the <see cref="T:System.Exception" />. This class cannot be inherited.
    /// </summary>
    [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = false)]
    public sealed class RuntimeCompatibilityAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" /> class.
        /// </summary>
        public RuntimeCompatibilityAttribute()
        {
        }

        /// <summary>
        /// Gets or sets a value that indicates whether to wrap exceptions that do not derive from the <see cref="T:System.Exception" /> class.
        /// </summary>
        /// <returns>true if exceptions that do not derive from the <see cref="T:System.Exception" /> class should be wrapped; otherwise, false.</returns>
        public bool WrapNonExceptionThrows { get; set; }
    }
}
